From dff239608c66daf1f540ae53724ab4dd1564dacc Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sat, 4 Apr 2015 16:18:47 -0700 Subject: [PATCH] Make `print-new-snapshot` fail on 403 --- src/etc/print-new-snapshot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/print-new-snapshot.py b/src/etc/print-new-snapshot.py index 8c7d0e898..0c5e52a32 100644 --- a/src/etc/print-new-snapshot.py +++ b/src/etc/print-new-snapshot.py @@ -25,7 +25,7 @@ for platform in sorted(snaps): tarball = 'cargo-nightly-' + triple + '.tar.gz' url = 'https://static-rust-lang-org.s3.amazonaws.com/cargo-dist/' + date + '/' + tarball dl_path = "target/dl/" + tarball - ret = subprocess.call(["curl", "-s", "-o", dl_path, url]) + ret = subprocess.call(["curl", "-f", "-s", "-o", dl_path, url]) if ret != 0: raise Exception("failed to fetch url") h = hashlib.sha1(open(dl_path, 'rb').read()).hexdigest() -- 2.30.2